-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added prettier, eslint-config-prettier, and plugin:react/recommended to extends #14
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AlexVCS , good job and thanks a lot for your contribution to the project 💪 !
I left a few comments with some things to modify. Do you think you can implement the changes?
Cheers
} | ||
ignorePatterns: ["dist", ".eslintrc.cjs"], | ||
parser: "@typescript-eslint/parser", | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add the following two rules. The first one is needed since we're using React v17+ and therefore not importing React anymore, and we need the second one too as we are not really using prop-types very consistently (we will eventually refactor to TS so we're not bothering with that anymore):
rules: {
"react/react-in-jsx-scope": "off",
"react/prop-types": "off"
}
Add as well:
settings: {
react: {
version: "detect",
},
},
to avoid getting a warning when running eslint
@@ -86,5 +92,9 @@ | |||
"peerDependencies": { | |||
"react": ">=18.2.0", | |||
"react-dom": ">=18.2.0" | |||
}, | |||
"lint-staged": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be something like this:
"lint-staged": {
"*.{ts,tsx,js,jsx}": "eslint --cache --fix",
"*.{ts,tsx,js,jsx,css,less,md,html}": "prettier --write"
}
since we want eslint to check js,jsx
files too and prettier to format ts,tsx,jsx,less,html
files as well. Also .eslintcache
file should be added to .gitignore
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AlexVCS, sorry for the late review, the holidays got in the way and I didn't have time to review until now. Thanks a lot for implementing the changes, everything looks good now :)
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
working on #12